Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation for Analog to Digital converter #281

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ThomasMacas
Copy link
Collaborator

Fixes #278

Created ADCConverterHelper.java, and ADCConverterController.java in order to have functionality for ADC0834 and other Analog to Digital devices.

ADC implementation was needed in order to implement a thermistor and any other analog devices. The Raspberry pi does not have any analog pins so this ADC bridge is needed. The Raspberry Pi is communicating with the ADC and not thermistor, as the thermistor is communicating with the ADC.

The helper class implements the basic input and output that the ADC takes and sends. The controller is the way we can see the output that the ADC sends. Then the Application.yml has been updated to handle the many communication protocols that the ADC has.

@ThomasMacas ThomasMacas self-assigned this Nov 11, 2024
Copy link
Collaborator

@yrlmanoharreddy yrlmanoharreddy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your implementation is super solid, but to enhance code robustness, please add try-catch blocks in the readValue() method to catch any runtime exceptions and log them appropriately. This will help with error handling and improve reliability. Additionally, please include comments explaining the reason behind operations such as cs.low() or clk.high() to make the code clearer for future maintainers. Once these adjustments are made, the code will be more comprehensive and easier to maintain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement ADC(Analog ro Digital Convertor) Support for Raspberry Pi
2 participants